﻿namespace EasyToolkit.Excel.UI.SortAndFilter
{
    using System.Windows;
    using EasyToolkit.Excel.UI.BindingTemplate.SortAndFilter.ViewModels;
    using EasyToolkit.BindingTemplates.Views;
    using MahApps.Metro.Controls;
    
    /// <summary>
    /// Logique d'interaction pour SortAndFilerWindow.xaml
    /// </summary>
    public partial class SortAndFilerWindow : MetroWindow
    {
        public SortAndFilerWindow(IRootTemplateView rootTemplateView)
        {
            if (Application.Current == null)
                new Application();

            Application.Current.ShutdownMode = ShutdownMode.OnExplicitShutdown;

            InitializeComponent();

            SortAndFilterViewModel viewModel = new SortAndFilterViewModel(rootTemplateView);
            this.DataContext = viewModel;
        }
    }
}
